Skip to content

Conversation

@vidaldid-rte
Copy link
Collaborator

@vidaldid-rte vidaldid-rte commented Oct 24, 2025

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
#1268

NOTE:
This PR depends on powsybl/powsybl-core#3635 (review)

What kind of change does this PR introduce?
If a generator is configured for remote voltage control but needs to turn local for any reason and if a local target v is defined, that value is used instead of keeping the same pu target.
Reasons for tunring remote to local include:
parameter voltageRemoteControl set to false
consistency checks in OLF that switch a remote voltage control to a local voltage control

What is the current behavior?
When a generator is moved to local voltage control the remote target in pu is kept locally

What is the new behavior (if this is a feature change)?
If a local target has been defined (by a state esimator or any other process in charge of coputing voltage target) that value is used instead.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No - but it takes advantage of a new API in core that may be a simple addition to existing APIs or be embedded in a breaking change refactoring in core

@vidaldid-rte vidaldid-rte marked this pull request as draft October 24, 2025 15:44
@vidaldid-rte vidaldid-rte force-pushed the feature/use_local_target_v branch from 1240cd1 to 6bdec1c Compare November 17, 2025 17:04
@vidaldid-rte vidaldid-rte changed the title [WIP] Use generator local targetV if set as locale regulation Use generator local targetV if set as locale regulation Nov 18, 2025
@vidaldid-rte vidaldid-rte changed the base branch from main to ci/core-7.1.0-SNAPSHOT November 18, 2025 14:53
@vidaldid-rte vidaldid-rte marked this pull request as ready for review November 18, 2025 14:54
@vidaldid-rte vidaldid-rte force-pushed the ci/core-7.1.0-SNAPSHOT branch 2 times, most recently from 6250ea7 to 4ae5029 Compare November 26, 2025 14:08
Base automatically changed from ci/core-7.1.0-SNAPSHOT to main November 28, 2025 12:54
@vidaldid-rte vidaldid-rte force-pushed the feature/use_local_target_v branch from 8581251 to 54769aa Compare November 28, 2025 13:13
Signed-off-by: Didier Vidal <[email protected]>
Signed-off-by: Didier Vidal <[email protected]>
if (disableInconsistentVoltageControls && Math.abs(localTargetV - genLocalTargetV) > TARGET_V_EPSILON) {
return Double.NaN;
}
// else if !disableInconsistentVoltageControls keep the first voltage target found
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a warn log/report when detecting inconsistent voltage control (precising if this local voltage control is taken into account or not regarding the parameter disableInconsistentVoltageControl) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. It also joins a remark from Damien that challenged the new equivalentTargetV API in lfGenerator.
I refactored in order to keep only one targetV and reuse all existing check mechanisms.

olf.reactiveControllerBusesToPqBuses = ${remoteReactivePowerControllerBusToPqCount} noeuds électriques avec régleur de puissance réactive à distance passé(s) en PQ
olf.reactiveControllerBusesToPqMaxQ = Réglage de la puissance réactive distante du noeud électrique '${busId}' -> PQ, q=${busQ} > maxQ=${maxQ}
olf.reactiveControllerBusesToPqMinQ = Noeud électrique ${busId} régleur de puissance réactive à distance -> PQ, q=${busQ} < minQ=${minQ}
olf.rescaledRemoteVoltageControls = ${count} contrôles de tension distants n'ont pas de consigne équivalente locale et passent en réglage local par mise à l'échelle de la tension nominale locals.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mise à l'échelle de la tension nominale locale."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

vidaldid-rte and others added 6 commits December 1, 2025 10:08
…oaderImpl.java

Co-authored-by: Sylvestre Prabakaran <[email protected]>
Signed-off-by: vidaldid-rte <[email protected]>
Signed-off-by: Didier Vidal <[email protected]>
Signed-off-by: Didier Vidal <[email protected]>
Signed-off-by: Didier Vidal <[email protected]>
SylvestreSakti
SylvestreSakti previously approved these changes Dec 1, 2025
@jeandemanged jeandemanged changed the title Use generator local targetV if set as locale regulation Use generator local targetV if set as local regulation Dec 2, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@SylvestreSakti SylvestreSakti merged commit a09eae1 into main Dec 3, 2025
8 checks passed
@SylvestreSakti SylvestreSakti deleted the feature/use_local_target_v branch December 3, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants